import { RouteRecordRaw } from 'vue-router'

export interface MetaProps {
	icon: string
	title: string
	activeMenu?: string
	isLink?: string
	isHide: boolean
	// isFull: boolean;
	isAffix: boolean
	isKeepAlive: boolean
}

export interface MenuOptions {
	path: string
	name: string
	component?: string | (() => Promise<unknown>)
	redirect?: string
	meta: MetaProps
	children?: MenuOptions[]
}

/** AppState */
export interface AppState {
	userInfo: any
	token: string
	menuList: MenuOptions[]
}

/** AuthState */
export interface AuthState {
	routeName: string
	buttonList: {
		[key: string]: string[]
	}
	menuList: RouteRecordRaw[]
}
